import unittest


def resta(x,y):
	return x-y
	
def sum(x,y):
	if type(x) == str or type(y) == str:
		return "error"
	else:
		return x +y

def division (x,y):
	try : 
	 divi = x/y 
	except ZeroDivisionError : 
	 	return  "error al dividir por cero"
	
 	else:
		return divi



def multiplicacion(x,y):
	return x*y




class restatest(unittest.TestCase):
	def test(self):
		self.assertEqual(resta(3,3),0)
		
class sumtest(unittest.TestCase):
	def test(self):
		self.assertEqual(sum(3,3),6)
		self.assertEqual(sum("hola ","mundo"),"error")
		self.assertEqual(sum(10,"anios"),"error")

		
class multiplicaciontest(unittest.TestCase):
	def test(self):
		self.assertEqual(multiplicacion(3,20),60)		
		
class divisiontest(unittest.TestCase):
	def test(self):
		self.assertEqual(division(10,2),5)
		self.assertEqual(division(10,0), "error al dividir por cero")
	
			
if __name__ =="__main__":
	unittest.main()
